﻿using System.Web;
using System.Web.Script.Serialization;

namespace Aidbrella.Web
{
    public static class ObjectExtensions
    {
        public static HtmlString ToJson(this object input)
        {
            var serializer = new JavaScriptSerializer();
            return new HtmlString(serializer.Serialize(input));
        }
    }
}